CXX = g++
CXXFLAGS = -std=c++17 -pthread -Wall -O2
TARGET = core

# Default target
all: $(TARGET)
	./$(TARGET)  --asm asm/prime.asm

# Build the executable only if source files have changed
$(TARGET): core.cpp
	$(CXX) $(CXXFLAGS) -o $@ $<

# Clean up build artifacts
clean:
	rm -f $(TARGET) *.o
	rm -f vm_memory/*

# Phony targets (not real files)
.PHONY: all clean
